package info.techgeek.labs.view;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class Collection {

	public Customer setCustomerDetails(){
		
		Customer customer = new Customer();
		
		customer.setCustDeptId("1");
		customer.setCustName("krithika");
		customer.setCustAddress("chennai");
		customer.setCustDeptId("2");
		
		List<Customer> list = new ArrayList<Customer>();
		
		list.add(customer);
		
		return customer;
	}
	
	public void getCustomerDetails(List<Customer> list){
		
		Iterator iterator = list.iterator();
		
		while(iterator.hasNext()){
		
			Customer customer = (Customer)iterator.next();
			System.out.println("Customer name "+customer.getCustName());
		}
		
		/*for(Customer customer : list){
			
			System.out.println("Customer name "+customer.getCustName());
		}*/
		
	}
	
	
}
